package com.epfresh.supplier.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.epfresh.api.global.BaseActivity;
import com.epfresh.supplier.R;

public class FailReasonActivity extends BaseActivity {

	static final String TAG = "QuestionActivity";
	private TextView tvReason;
	private TextView tvConnection;
	String reason,phone;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_fail_reason);
		initData();
		initView();
	}

	private void initView() {
		tvReason = (TextView)findViewById(R.id.tv_reason);
		tvConnection = (TextView)findViewById(R.id.tv_connection);
		tvReason.setText("    "+reason);
		tvConnection.setOnClickListener(this);
		ivBack.setVisibility(View.VISIBLE);
		toolbarTitle.setText("退款失败原因");
	}

	private void initData() {
		reason = getIntent().getStringExtra("reason");
		phone = getIntent().getStringExtra("phone");
	}


	public void onClick(View view) {
		switch (view.getId()) {
			case R.id.tv_connection:
				Intent call = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phone));//调出来拨打页面；
				startActivity(call);
				break;
			default:
				break;
		}
	}

}
